#define _CRT_SECURE_NO_WARNINGS 1
#include"Sort.h"
void TestInsertSort() {
	int arr[] = { 9,8,7,6,5,4,3,2,1 };
	PrintArr(arr, sizeof(arr) / sizeof(arr[0]));
	InsertSort(arr, sizeof(arr) / sizeof(arr[0]));
	PrintArr(arr, sizeof(arr) / sizeof(arr[0]));
}
void TestShellSort() {
	int arr[] = { 9,8,7,6,5,4,3,2,1 };
	PrintArr(arr, sizeof(arr) / sizeof(arr[0]));
	ShellSort(arr, sizeof(arr) / sizeof(arr[0]));
	PrintArr(arr, sizeof(arr) / sizeof(arr[0]));
}
void TestSelectSort() {
	int arr[] = { 9,8,7,6,5,4,3,2,1 };
	PrintArr(arr, sizeof(arr) / sizeof(arr[0]));
	SelectSort(arr, sizeof(arr) / sizeof(arr[0]));
	PrintArr(arr, sizeof(arr) / sizeof(arr[0]));
}
void TestHeapSort() {
	int arr[] = { 9,8,7,6,5,4,3,2,1 };
	PrintArr(arr, sizeof(arr) / sizeof(arr[0]));
	HeapSort(arr, sizeof(arr) / sizeof(arr[0]));
	PrintArr(arr, sizeof(arr) / sizeof(arr[0]));
}
void TestBubble() {
	int arr[] = { 9,8,7,6,5,4,3,2,1 };
	PrintArr(arr, sizeof(arr) / sizeof(arr[0]));
	BubbleSort(arr, sizeof(arr) / sizeof(arr[0]));
	PrintArr(arr, sizeof(arr) / sizeof(arr[0]));
}
void TestQuickSort() {
	int arr[] = { 9,8,7,6,5,4,3,2,1 };
	PrintArr(arr, sizeof(arr) / sizeof(arr[0]));
	QuickSort(arr, 0, sizeof(arr) / sizeof(arr[0]) - 1);
	PrintArr(arr, sizeof(arr) / sizeof(arr[0]));
}
void TestMergeSort() {
	int arr[] = { 9,8,7,6,5,4,3,2,1 };
	PrintArr(arr, sizeof(arr) / sizeof(arr[0]));
	MergeSort(arr, sizeof(arr) / sizeof(arr[0]));
	PrintArr(arr, sizeof(arr) / sizeof(arr[0]));
}
void TestMergeSortNonR() {
	int arr[] = { 9,8,7,6,5,4,3,2,1 };
	PrintArr(arr, sizeof(arr) / sizeof(arr[0]));
	MergeSortNonR(arr, sizeof(arr) / sizeof(arr[0]));
	PrintArr(arr, sizeof(arr) / sizeof(arr[0]));
}
void TestMergeSortFile() {
	MergeSortFile("Sort.txt");
}
void TestCountSort() {
	int arr[] = { 9,8,7,6,5,4,3,2,1 };
	PrintArr(arr, sizeof(arr) / sizeof(arr[0]));
	CountSort(arr, sizeof(arr) / sizeof(arr[0]));
	PrintArr(arr, sizeof(arr) / sizeof(arr[0]));
}
int main() {
	//TestInsertSort();
	//TestShellSort();
	//TestSelectSort();
	//TestHeapSort();
	//TestBubble();
	//TestQuickSort();
	//TestMergeSortNonR();
	//TestMergeSortFile();
	TestCountSort();
	//TestOP();
	
	return 0;
}